<?php

class Application_Form_Selectrate extends Zend_Form
{
	
        public function __construct()
	{
            $translate = new My_Action_Helper_Lang();
            
            $this->setName('selectrate_form');
            parent::__construct();

            $rate = new Zend_Form_Element_Select('id_rate');
            $table = new Application_Model_Profile();
            //добавляем опции в форму
            //$rate->addMultiOption(0, $translate->_('Please select rate'));
            //$rate->setLabel($translate->_('Rates'));
            //массивом передаем значения в select
            foreach ($table->getAllRates() as $table) {
                $rate->addMultiOption($table['id'], $table['name']);
            }

            $submit = new Zend_Form_Element_Submit('submit');
            $submit->setLabel($translate->_('Select rate'))
                   ->setAttrib('class', 'button');

            $this->addElements(array($rate, $submit));
        }
}